PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Parameters

Parameters are values that are included with a command. The "Parameters" section of a command definition lists the parameters of a particular command and the information you need to use them correctly.

Many commands include a direct parameter that specifies the object of the action. If a command includes parameters other than the direct parameter, they are identified by labels. Parameters that are identified by labels are called labeled parameters. The direct parameter immediately follows the command; labeled parameters can be listed in any order. For example, the following is the syntax for the Move command:

move referenceToObject to referenceToLocation

The Move command has a direct parameter ( referenceToObject. that specifies the object to move and a labeled parameter (whose label is to ) that specifies where to move the object. An actual Move statement looks like the following:

move currentReport to ReportFolder

Each parameter value must belong to a particular class, which is listed in its description in the command definition. For the Move command, the direct parameter belongs to the class reference. Its value, a reference, is a phrase that identifies the object to be moved. The to parameter also belongs to the class reference. It specifies the location to which to move the object. References are described in Objects and References.

Parameters can be required or optional. Required parameters must be included with the command; optional parameters need not be. Optional parameters are enclosed in brackets in syntax descriptions. For optional parameters, the description in the "Parameters" section specifies a default value that is used if you don't include the parameter.

For more information about direct parameters, see Application Commands. For more information about using parameters, see Using Parameters.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)